import http from '../http'

// 获取拥堵数据
export const getCongestionData = () => {
  return http.get('/traffic/congestion')
}

// 通过高德地图API获取分段指标数据
export const getTimeDistributionData = (dataType = '1') => {
  return http.get('/traffic/time-distribution', {
    params: { dataType }
  })
}

export const getCongestionRanking = () => {
  return http.get('/traffic/congestion-ranking')
}

// 获取区域排名数据
export const getDistrictRank = (type = '1') => {
  return http.get('/traffic/district-rank', {
    params: { type }
  })
}

// 获取交通指标数据
export const getTrafficIndicators = () => {
  return http.get('/traffic/indicators')
}
